package com.yudi.blog.bussiness.dao;

import com.yudi.blog.bussiness.dto.Type;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author YuDi
 * @Date 2021/11/10 17:27
 * @Version 1.0
 */

@Repository
public interface TypeRepository extends JpaRepository<Type, Long> {

    @Query("select t from Type t")
    List<Type> findTop(Pageable pageable);

}
